export enum BillState {
  toSubmit = 'toSubmit',
  toAudit = 'toAudit',
  auditted = 'auditted'
}
export const billStates = [
  { label: '待提交', value: 'toSubmit', color: 'primary' },
  { label: '待审核', value: 'toAudit', color: 'warning' },
  { label: '已通过', value: 'auditted', color: 'success' }
]

export class PurchaseItem {
  itemId: number = 0
  billFk: string = ''
  priority: number = 0
  goodsCode: string = ''
  goodsName: string = ''
  price: number = 0
  quantity: number = 0
}
// 主表

export class PurchaseBill {
  // billId主键
  billId: string = ''
  billState: BillState = BillState.toSubmit
  supplier: string = ''
  orderDate: Date | string = null
  receiveDate: Date | string = null
  amount: number = 0.0
  nextItemId: number = 0
  applier: string = ''
  applyTime: Date | string = null
  auditor: string = ''
  auditTime: Date | string = null
  auditMsg: string = ''
  history: string = ''
  updateTime: Date | string = null
  items: Array<PurchaseItem> = []
}
